package com.mydemo.design_pattern.action_type.strategy_pattern.demo2;

import com.mydemo.design_pattern.action_type.strategy_pattern.demo2.impl.BalancePay;
import com.mydemo.design_pattern.action_type.strategy_pattern.demo2.impl.QuickPay;

/**
 * <p></p >
 *
 * @author liming1
 * @version $Id: TestDemo, v1.0 2019-09-24 13:40 liming1 Exp $
 */
public class TestDemo {
    public static void main(String[] args) {
        PayContext context = new PayContext();
        context.setPayStrategy(new BalancePay());
        context.toPay(new PayRequest());

        context.setPayStrategy(new QuickPay());
        context.toPay(new PayRequest());
    }
}
